1. Field of the Invention
The invention relates to debugging a program in real-time.
2. Description of the Related Art
Debugging and development tools for locating and eliminating defects, or bugs, in programs for data processing systems are well known. In the past, debugging tools were able to monitor an associated memory as a program was operating normally, which is referred to as “real-time” debugging. Real-time debugging enables data variable watching during program execution in order to determine whether or not the program is working properly.
Initially, a debug program was executed on the main board of the computer. As both programs and processing systems have increased in speed and complexity, the large increase in data and variables to watch during a debug operation exceeded the processing power of the processor and/or the output of the data bus to permit real-time debugging from software running on the computer. In response, the monitoring of data variables has been limited to obtaining variable updates only when the code is not running or intentionally stopped. Debugging tools typically accomplish this using breakpoints, which halt program execution upon the occurrence of specific events. Data variables generated by the program can then be examined at the breakpoint. This poses a problem, as the program can behave differently when it is halted than it would during normal operation. In addition, this creates severe limitations on debugging abilities, as data variables are not examined between breakpoints.
When real-time debugging is necessary, relatively expensive external hardware is used. The external debugging device has sufficient processor speed and a fast enough data bus to effect the real-time debugging. Many families of processors do not have the ability to provide real-time variable monitoring or debugging. There is, therefore, a need for the ability to debug complex programs in real-time using only standard debugging software and the data processing system itself.